package com.dofast.bt.bean;

import com.dofast.bt.base.BaseApplication;

import org.xutils.db.annotation.Column;
import org.xutils.db.annotation.Table;
import org.xutils.ex.DbException;

import java.io.Serializable;
import java.util.List;

/**
 * Created by Administrator on 2016/12/13.
 * 我的购物车
 */
@Table(name = "myCar")
public class MyCar implements Serializable {
    @Column(name = "carId",isId = true, property = "NOT NULL")
    private int carId;
    //客户姓名
    @Column(name = "addrId")
    private String addrId;

    public  AddressBean getAddr() throws DbException {
        return  BaseApplication.getDbManager().findById(AddressBean.class,addrId);
    }

    public List<ShoppingCartBean> getShoppingCars() throws DbException {
        return BaseApplication.getDbManager().findAll(ShoppingCartBean.class);
    }
    public int getCarId() {
        return carId;
    }

    public void setCarId(int carId) {
        this.carId = carId;
    }

    public String getAddrId() {
        return addrId;
    }

    public void setAddrId(String addrId) {
        this.addrId = addrId;
    }
}
